<?php
namespace app\admin\model;
use think\Model;
/**
* 
*/
class Openplate extends model{
	function findall(){
		$res = db('openplate')->select();
		return $res;
	}
	function fuindata($datatime){
		$res = model('openplate')->where('datetime',$datatime)->find();
		return $res;
	}
	function findid($id){
		$res = $this->where('id',$id)->count();
		return $res;
	}
	function findtime($times){
		$res = model('openplate')->where('opentime',"<",$times)->where('tclosetime',">",$times)->find();
		return $res;
	}
	function findtime1(){
		$res = db('openplate o1')->field('o1.opentime,o1.tclosetime,o1.zclosetime,o1.datetime')->select();
		return $res;
	}
	function findqishu(){
		$res = db('openplate')->where('id',7)->find();
		return $res;
	}
	function finddata(){
		$res=db('openplate')->where('opentime','<',time())->where('tclosetime','>',time())->find();
		return $res['datetime'];
	}
}